package com.example.demo.common.serviceImpl;

import com.example.demo.common.entity.Sample;
import com.example.demo.common.mapper.SampleMapper;
import com.example.demo.common.service.SampleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service
public class SampleServiceImpl implements SampleService {
    @Resource
    SampleMapper sampleMapper;
    @Override
    public void saveSample(Sample sample){
        sampleMapper.insert(sample);
    }
    @Override
    public void updateSample(Sample sample){
        sampleMapper.updateById(sample);
    }
    @Override
    public void deleteById(Long id){
        sampleMapper.deleteById(id);
    }
    @Override
    public int count_table(){
        return sampleMapper.count();
    }

}
